package com.prs.crm.domain.purchase;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.fs.BankAccount;
import com.prs.crm.domain.hr.Person;

/**
 * 退货资金到账
 * 
 * @author 兰小刚
 * @version 创建时间：2010-7-22 上午09:33:28 类说明
 */
@Entity
@Table(name = "purchase_FundsInBar")
public class FundsInBar extends BaseEntity {

	private static final long serialVersionUID = -4867503240956693033L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	/**
	 * 入账主题
	 */
	private String inName;

	/**
	 * 入账账户
	 */
	@ManyToOne
	private BankAccount bankAccount;
	/**
	 * 入账日期
	 */
	private Date inDate;
	/**
	 * 入账金额
	 */
	private Double inMony;
	@ManyToOne
	private PurchaseOrder purchaseOrder;
	/**
	 * 入账人
	 */
	@ManyToOne
	private Person person;
	/**
	 * 备注
	 */
	@Lob
	private String remark;

	/**
	 * 状态
	 * 
	 * @return
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private Integer inState;

	private String returnCode;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public BankAccount getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(BankAccount bankAccount) {
		this.bankAccount = bankAccount;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getInState() {
		return inState;
	}

	public void setInState(Integer inState) {
		this.inState = inState;
	}

	public String getReturnCode() {
		return returnCode;
	}

	public void setReturnCode(String returnCode) {
		this.returnCode = returnCode;
	}

	public String getInName() {
		return inName;
	}

	public void setInName(String inName) {
		this.inName = inName;
	}

	public Date getInDate() {
		return inDate;
	}

	public void setInDate(Date inDate) {
		this.inDate = inDate;
	}

	public Double getInMony() {
		return inMony;
	}

	public void setInMony(Double inMony) {
		this.inMony = inMony;
	}

	public PurchaseOrder getPurchaseOrder() {
		return purchaseOrder;
	}

	public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
		this.purchaseOrder = purchaseOrder;
	}

}
